﻿do
	IGAS:NewAddon("IGAS_Studio")

	local _DB

	------------------------------------------------------------
	-- ScriptType
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.GameTooltip, "ScriptType")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.Frame, "ScriptType"))

	------------------------------------------------------------
	-- Function
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.GameTooltip, "Function")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.Frame, "Function"))

	_DB:AddCodeHelp("SetQuestLogRewardSpell", [=[Fills the tooltip with information about the reward spell for the selected quest in the quest log]=], [=[SetQuestLogRewardSpell()]=])
	_DB:AddCodeHelp("SetText", [=[Sets the text displayed as the button's label]=], [=[SetText("text")]=])
	_DB:AddCodeHelp("SetExistingSocketGem", [=[Fills the tooltip with information about a permanently socketed gem]=], [=[SetExistingSocketGem(index, toDestroy)]=])
	_DB:AddCodeHelp("SetHyperlink", [=[Fills the tooltip with information about an item, quest, spell, or other entity represented by a hyperlink]=], [=[SetHyperlink("hyperlink")]=])
	_DB:AddCodeHelp("SetTradeSkillItem", [=[Fills the tooltip with information about an item created by a trade skill recipe or a reagent in the recipe]=], [=[SetTradeSkillItem(skillIndex [, reagentIndex])]=])
	_DB:AddCodeHelp("SetTotem", [=[Fills the tooltip with information about one of the player's active totems.]=], [=[SetTotem(slot)]=])
	_DB:AddCodeHelp("SetSocketGem", [=[Fills the tooltip with information about a gem added to a socket]=], [=[SetSocketGem(index)]=])
	_DB:AddCodeHelp("SetPetAction", [=[Fills the tooltip with information about a pet action]=], [=[SetPetAction(index)]=])
	_DB:AddCodeHelp("SetLootItem", [=[Fills the tooltip with information about an item available as loot]=], [=[SetLootItem(slot)]=])
	_DB:AddCodeHelp("NumLines", [=[Returns the number of lines of text currently shown in the tooltip]=], [=[NumLines()]=])
	_DB:AddCodeHelp("GetSpell", [=[Returns information about the spell displayed in the tooltip]=], [=[GetSpell()]=])
	_DB:AddCodeHelp("FadeOut", [=[Causes the tooltip to begin fading out]=], [=[FadeOut()]=])
	_DB:AddCodeHelp("SetQuestLogSpecialItem", [=[Fills the tooltip with information about a usable item associated with a current quest]=], [=[SetQuestLogSpecialItem(questIndex)]=])
	_DB:AddCodeHelp("IsEquippedItem", [=[Returns whether the tooltip is displaying an item currently equipped by the player]=], [=[IsEquippedItem()]=])
	_DB:AddCodeHelp("SetBuybackItem", [=[Fills the tooltip with information about item recently sold to a vendor and available to be repurchased]=], [=[SetBuybackItem(index)]=])
	_DB:AddCodeHelp("SetMerchantItem", [=[Fills the tooltip with information about an item available for purchase from a vendor]=], [=[SetMerchantItem(merchantIndex)]=])
	_DB:AddCodeHelp("SetMerchantCostItem", [=[Fills the tooltip with information about an alternate currency required to purchase an item from a vendor]=], [=[SetMerchantCostItem(index, currency)]=])
	_DB:AddCodeHelp("SetTalent", [=[Fills the tooltip with information about a talent]=], [=[SetTalent(tabIndex, talentIndex, inspect, pet, talentGroup)]=])
	_DB:AddCodeHelp("SetInventoryItem", [=[Fills the tooltip with information about an equipped item]=], [=[SetInventoryItem("unit", slot [, nameOnly])]=])
	_DB:AddCodeHelp("GetAnchorType", [=[Returns the method for anchoring the tooltip relative to its owner]=], [=[GetAnchorType()]=])
	_DB:AddCodeHelp("SetAuctionSellItem", [=[Fills the tooltip with information about the item currently being set up for auction]=], [=[SetAuctionSellItem()]=])
	_DB:AddCodeHelp("SetBagItem", [=[Fills the tooltip with information about an item in the player's bags]=], [=[SetBagItem(container, slot)]=])
	_DB:AddCodeHelp("SetAction", [=[Fills the tooltip with information about the contents of an action slot]=], [=[SetAction(slot)]=])
	_DB:AddCodeHelp("SetAuctionCompareItem", [=[]=], [=[]=])
	_DB:AddCodeHelp("SetAuctionItem", [=[Fills the tooltip with information about an item in the auction house]=], [=[SetAuctionItem("list", index)]=])
	_DB:AddCodeHelp("GetPadding", [=[Returns the amount of space between tooltip's text and its right-side edge]=], [=[GetPadding()]=])
	_DB:AddCodeHelp("GetOwner", [=[Returns the frame to which the tooltip refers and is anchored]=], [=[GetOwner()]=])
	_DB:AddCodeHelp("GetMinimumWidth", [=[Returns the minimum width of the tooltip]=], [=[GetMinimumWidth()]=])
	_DB:AddCodeHelp("SetCurrencyToken", [=[Fills the tooltip with information about a special currency type]=], [=[SetCurrencyToken(index)]=])
	_DB:AddCodeHelp("SetShapeshift", [=[Fills the tooltip with information about an ability on the stance/shapeshift bar]=], [=[SetShapeshift(index)]=])
	_DB:AddCodeHelp("SetPadding", [=[Sets the amount of space between tooltip's text and its right-side edge]=], [=[SetPadding(padding)]=])
	_DB:AddCodeHelp("SetOwner", [=[Sets the frame to which the tooltip refers and is anchored]=], [=[SetOwner(frame [, "anchorType" [, xOffset [, yOffset]]])]=])
	_DB:AddCodeHelp("SetTracking", [=[Fills the tooltip with information about the currently selected tracking type]=], [=[SetTracking()]=])
	_DB:AddCodeHelp("ClearLines", [=[Clears the tooltip's contents]=], [=[ClearLines()]=])
	_DB:AddCodeHelp("SetSocketedItem", [=[Fills the tooltip with information about the item currently being socketed]=], [=[SetSocketedItem()]=])
	_DB:AddCodeHelp("SetUnitDebuff", [=[Fills the tooltip with information about a debuff on a unit]=], [=[SetUnitDebuff("unit", index [, "filter"])]=])
	_DB:AddCodeHelp("AddDoubleLine", [=[Adds a line to the tooltip with both left-side and right-side portions]=], [=[AddDoubleLine("textLeft", "textRight" [, rL [, gL [, bL [, rR [, gR [, bR]]]]]])]=])
	_DB:AddCodeHelp("SetGlyph", [=[Fills the tooltip with information about one of the player's glyphs]=], [=[SetGlyph(socket, talentGroup)]=])
	_DB:AddCodeHelp("SetTrainerService", [=[Fills the tooltip with information about a trainer service]=], [=[SetTrainerService(index)]=])
	_DB:AddCodeHelp("SetEquipmentSet", [=[Fills the tooltip with information about an equipment set]=], [=[SetEquipmentSet("name")]=])
	_DB:AddCodeHelp("SetInboxItem", [=[Fills the tooltip with information about an item attached to a message in the player's inbox]=], [=[SetInboxItem(mailID, attachmentIndex)]=])
	_DB:AddCodeHelp("IsOwned", [=[Returns whether the tooltip has an owner frame]=], [=[IsOwned()]=])
	_DB:AddCodeHelp("SetAnchorType", [=[Sets the method for anchoring the tooltip relative to its owner]=], [=[SetAnchorType("anchor" [, xOffset [, yOffset]])]=])
	_DB:AddCodeHelp("SetHyperlinkCompareItem", [=[Fills the tooltip with information about the item currently equipped in the slot used the supplied item]=], [=[SetHyperlinkCompareItem("hyperlink" [, index])]=])
	_DB:AddCodeHelp("SetQuestRewardSpell", [=[Fills the tooltip with information about the spell reward in a questgiver dialog]=], [=[SetQuestRewardSpell()]=])
	_DB:AddCodeHelp("AddTexture", [=[Adds a texture to the last tooltip line]=], [=[AddTexture("texture")]=])
	_DB:AddCodeHelp("SetBackpackToken", [=[Fills the tooltip with information about a currency marked for watching on the Backpack UI]=], [=[SetBackpackToken(index)]=])
	_DB:AddCodeHelp("SetTradeTargetItem", [=[Fills the tooltip with information about an item offered for trade by the target]=], [=[SetTradeTargetItem(index)]=])
	_DB:AddCodeHelp("SetUnit", [=[Sets the model to display the 3D model of a specific unit]=], [=[SetUnit("unit")]=])
	_DB:AddCodeHelp("SetTradePlayerItem", [=[Fills the tooltip with information about an item offered for trade by the player]=], [=[SetTradePlayerItem(index)]=])
	_DB:AddCodeHelp("SetGuildBankItem", [=[Fills the tooltip with information about an item in the guild bank]=], [=[SetGuildBankItem(tab, slot)]=])
	_DB:AddCodeHelp("SetSendMailItem", [=[Fills the tooltip with information about an item attached to the outgoing mail message]=], [=[SetSendMailItem(slot)]=])
	_DB:AddCodeHelp("SetSpell", [=[Fills the tooltip with information about a spell from the player (or pet's) spellbook]=], [=[SetSpell(id, "bookType")]=])
	_DB:AddCodeHelp("SetMerchantCompareItem", [=[]=], [=[]=])
	_DB:AddCodeHelp("SetPossession", [=[Fills the tooltip with information about one of the special actions available while the player possesses another unit]=], [=[SetPossession(index)]=])
	_DB:AddCodeHelp("SetUnitBuff", [=[Fills the tooltip with information about a buff on a unit]=], [=[SetUnitBuff("unit", index [, "filter"])]=])
	_DB:AddCodeHelp("IsUnit", [=[Returns whether the tooltip is displaying information for a given unit]=], [=[IsUnit("unit")]=])
	_DB:AddCodeHelp("SetQuestItem", [=[Fills the tooltip with information about an item in a questgiver dialog]=], [=[SetQuestItem("itemType", index)]=])
	_DB:AddCodeHelp("SetUnitAura", [=[Fills the tooltip with information about a buff or debuff on a unit]=], [=[SetUnitAura("unit", index [, "filter"])]=])
	_DB:AddCodeHelp("AppendText", [=[Adds text to the first line of the tooltip]=], [=[AppendText("text")]=])
	_DB:AddCodeHelp("GetUnit", [=[Returns information about the unit displayed in the tooltip]=], [=[GetUnit()]=])
	_DB:AddCodeHelp("AddFontStrings", [=[Adds `FontString` objects to the tooltip, allowing it to display an additional line of text]=], [=[AddFontStrings(left, right)]=])
	_DB:AddCodeHelp("SetQuestLogItem", [=[Fills the tooltip with information about an item related to the selected quest in the quest log]=], [=[SetQuestLogItem("itemType", index)]=])
	_DB:AddCodeHelp("AddLine", [=[Adds a line of text to the tooltip]=], [=[AddLine("text" [, r [, g [, b [, wrap]]]])]=])
	_DB:AddCodeHelp("SetMinimumWidth", [=[Sets the minimum width of the tooltip]=], [=[SetMinimumWidth(width)]=])
	_DB:AddCodeHelp("GetItem", [=[Returns the name and hyperlink for the item displayed in the tooltip]=], [=[GetItem()]=])
	_DB:AddCodeHelp("SetLootRollItem", [=[Fills the tooltip with information about an item currently up for loot rolling]=], [=[SetLootRollItem(id)]=])
	
	_DB:AddCodeHelp("GetLeftText", [[Get the left text of the given index line]], [[GetLeftText(index)]])
	_DB:AddCodeHelp("GetRightText", [[Get the right text of the given index line]], [[GetRightText(index)]])
	_DB:AddCodeHelp("GetTexture", [[Get the texutre of the given index line]], [[GetTexture(index)]])
	_DB:AddCodeHelp("GetMoney", [[Get the money of the given index, default 1]], [=[GetMoney([index])]=])
	------------------------------------------------------------
	-- Property
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.GameTooltip, "Property")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.Frame, "Property"))

end
